<?php $_faq = $this->getFaq() ?>

<?php if ($_faq): ?>
<div class="page-title" style="overflow: visible;">
	<h1><?php echo $this->htmlEscape($_faq->getQuestion()) ?></h1>
</div>

<div class="faq-detail">
	<p class="faq-date">
		<?php echo Mage :: getModel('core/date')->date('d.m.Y', $_faq->getPublicationTime()); ?>
	</p>
	
	<?php $_content =  Mage::helper('faq')->filter($_faq->getAnswer()); ?>
	<?php if (!empty($_content)): ?>
	<div class="faq-content">
		<?php foreach (explode("\n", $_content) as $paragraph): ?>
		<p><?php echo $paragraph ?></p>
		<?php endforeach; ?>
	</div>
	<?php endif; ?>
	
	<p><a href="<?php echo Mage :: app()->getStore()->getUrl('faq') ?>" title="<?php echo $this->__('Back to the FAQ overview') ?>"><?php echo $this->__('Back to the FAQ overview') ?></a></p>
</div>
<?php else: ?>
<div class="page-title">
	<h1><?php echo $this->__('Error') ?></h1>
</div>
	
<p><?php echo $this->__('The requested FAQ item could not be found!') ?></p>
<?php endif; ?>
